﻿//*************************************************************************
//面向服务的协作式智能交通系统仿真软件SoC-ITSS v2.1 alpha
//发布单位：西北工业大学--巴黎高科MINES机器人与群智能系统联合实验室
//团队负责人：张凯龙 Zhang Kailong
//团队成员：张大方、杨安胜、王敏、谢策、王雨佳、谢尘玉等
//联系我们：kl.zhang@nwpu.edu.cn
//2012-2021
//*************************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//*******************************************************
//
//文件名(File Name):           Directions.cs
//
//数据表(Tables):              nothing 

//          修改理由：         创建类
//
//*******************************************************
namespace CyberCarSimulation.Regulation
{
    class Directions
    {
        
        //TurningDirection数组中存放的是车辆在路口的行进方向，
        //根据车辆的原始LaneID和目的LaneID进行取用         
        public static int[,] TurningDirection;

        public static void setParams()
        {           
            Directions.TurningDirection = new int[5, 5];     

            /*TurningDirection矩阵的初始化*/
            Directions.TurningDirection[Definitions.WtoE_Lane, Definitions.WtoE_Lane] = Definitions.Straight;
            Directions.TurningDirection[Definitions.WtoE_Lane, Definitions.NtoS_Lane] = Definitions.Right;
            Directions.TurningDirection[Definitions.WtoE_Lane, Definitions.StoN_Lane] = Definitions.Left;

            Directions.TurningDirection[Definitions.EtoW_Lane, Definitions.EtoW_Lane] = Definitions.Straight;
            Directions.TurningDirection[Definitions.EtoW_Lane, Definitions.StoN_Lane] = Definitions.Right;
            Directions.TurningDirection[Definitions.EtoW_Lane, Definitions.NtoS_Lane] = Definitions.Left;

            Directions.TurningDirection[Definitions.StoN_Lane, Definitions.StoN_Lane] = Definitions.Straight;
            Directions.TurningDirection[Definitions.StoN_Lane, Definitions.WtoE_Lane] = Definitions.Right;
            Directions.TurningDirection[Definitions.StoN_Lane, Definitions.EtoW_Lane] = Definitions.Left;

            Directions.TurningDirection[Definitions.NtoS_Lane, Definitions.NtoS_Lane] = Definitions.Straight;
            Directions.TurningDirection[Definitions.NtoS_Lane, Definitions.EtoW_Lane] = Definitions.Right;
            Directions.TurningDirection[Definitions.NtoS_Lane, Definitions.WtoE_Lane] = Definitions.Left;
        }
    }
}
